# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mimerender
_pkgname=${pkgname#python-}
pkgver=0.6.0
pkgrel=12
pkgdesc="Transparently select a render function for an HTTP request handler's result."
arch=('any')
url='https://github.com/martinblech/mimerender'
license=('MIT')
depends=('python' 'python-mimeparse')
makedepends=('python-build' 'python-pip')
source=("https://github.com/martinblech/mimerender/archive/v$pkgver.tar.gz")
sha512sums=('68c584ba8ae608097b739078dd729bd8b5493087901ba281959abdb81d4e6052ff045c487fde4f67744b413bab36d7f938c68b162049ebe33bff642571b8fd98')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

